<?php
// module/Admin/view/Admin/Category/index.phtml

$title = "Category";
$this->headTitle($title);
?>
<h1><?php echo $this->escapeHtml($title); ?></h1>
<p>
	<a href="<?php echo $this->url('category', array('action' => 'add')); ?>">Add new category</a>

</p>
<table class="table">
	<tr>
		<th>Name</th>
		<th>Description</th>
		<th>&nbsp;</th>
	</tr>
	<?php foreach ($categories as $category) : ?>
		<tr>
			<td><?php echo $this->escapeHtml($category->name) ?></td>
			<td><?php echo $this->escapeHtml($category->desc) ?></td>
			<td>
				<a href="<?php
				echo $this->url('category', array(
					'action' => 'edit',
					'id' => $category->id,
				))
				?>">Edit</a>
				<a href="<?php
				echo $this->url('category', array(
					'action' => 'delete',
					'id' => $category->id))
				?>">Delete</a>
			</td>
		</tr>
<?php endforeach; ?>
</table>
